using System;
using UnityEngine;
using Unity.VisualScripting;
using ResourceVerifyFailureEventArgs = UnityGameFramework.Runtime.ResourceVerifyFailureEventArgs;

namespace LS.UGFUnits
{
    [UnitShortTitle("Resource Verify")]
    [UnitSurtitle("Failure")]
    public sealed class ResourceVerifyFailure : FrameworkEventUnit<ResourceVerifyFailureEventArgs>
    {
        protected override int EventId => ResourceVerifyFailureEventArgs.EventId;
        protected override string HookName => UGFHookNames.ResourceVerifyFailure;

        [DoNotSerialize]
        [PortLabelHidden]
        public ValueOutput Name
        {
            get;
            private set;
        }

        protected override void Definition()
        {
            base.Definition();
            Name = ValueOutput<string>(nameof(Name));
        }

        protected override void AssignArguments(Flow flow, ResourceVerifyFailureEventArgs args)
        {
            base.AssignArguments(flow, args);
            Name = ValueOutput<string>(nameof(Name));
        }
    }
}